
$typeArea:1226px;

$success:#0099CC;
$warm:#336699;
$side:left;
$soft:#CCFFFF;
$sky:#666699;
$grey:#999999;

.w {
    width: $typeArea;
    margin: 0 auto;
}

.header {
    height: 45px;
    background: $success;
    border-#{$side}: 1px solid $warm;

    .navBar{
        float:left;

        //&父选择器修饰符

        //> 子选择器
        //+ 相邻选择器
        //:hover
         
        &>li{
            float:left;
            padding:0 20px;
            line-height: 45px;
            position: relative;
            border:1px solid $warm;
            box-sizing: border-box;
            height:45px;
            line-height: 45px;

            &+li{
                border-left:0;
            }
            &:hover{
                background-color:$soft;
                .subNav{
                    width: 200px;
                    display: block;
                    background-color:$sky;
                    text-indent: 20px;
                }
            }

            a{
                display: block;
            }

            .subNav{
                position: absolute;
                left:0;
                top:45px;
                display: none;
            }
        }
    }

    .searchBar{
        float:right;
        margin-top:5px;
        border:1px solid $grey;

        .searchCon{
            width: 200px;
            outline: none;
            padding: 0;
            border:0;
            height:30px;
            float:left;
        }

        .searchBtn{
            display: block;
            width: 30px;
            height: 30px;
            background-color:$grey;
            float:right;
        }
    }
}
